
// const BASE_URL = "http://10.16.24.66:10086"
// const BASE_URL = "http://test1234.free.svipss.top"
// const BASE_URL = "http://192.168.211.16:10086"

const BASE_URL = "http://47.106.116.110:10086"

// const BASE_URL = "http://localhost:10086"
// const BASE_URL = "http://192.168.0.109:10086"



export const myRequest = (options) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: BASE_URL + options.url,
			// url: options.url, // 调用本地接口，使用完整的url
			method: options.method || 'GET',
			data: options.data || {},
			header: options.header,
			success: (res) => {
				if (res.data.code !== 0) {
					return uni.showToast({
						title: '获取数据失败'
					})
				}
				resolve(res)
			},
			fail: (err) => {
				uni.showToast({
					title: '请求数据失败'
				})
				reject(err)
			}
		})
	})
}
export default BASE_URL
